import request from "@/utils/request"

const url = '/uExpert'

// 获取专家分页数据
export function getExpertPageAPI({ page = 1, pageSize = 10 }) {
    return request({
        url: `${url}`,
        params: {
            page,
            pageSize
        }
    })
}

// 获取专家详情数据
export function getExpertDetailAPI(id) {
    return request({
        url: `${url}/${id}`
    })
}

// 修改专家信息
export function updateExpertInfoAPI({ realName, phone, profession, position, id }) {
    return request({
        url: `${url}`,
        method: 'POST',
        data: {
            realName,
            phone,
            profession,
            position,
            id
        }
    })
}